####################################################################################
#   makefile
####################################################################################

include ./config.local


LIB   :=LibOnvifServer.a


SRC += userdefine.c
SRC += xml.c
SRC += network.c
SRC += list.c
SRC += onvifmain.c
SRC += group.c
SRC += activegroup.c
SRC += usrmem.c
SRC += onvifinit.c
SRC += profile.c
SRC += alarm.c
SRC += base64.c
SRC += userdefine.c
SRC += searchlist.c
SRC += digest.c
SRC += SHA1.c
SRC += onvifsha1.c
SRC += discover.c
SRC += groupxmlcommon.c
#SRC += media.c
SRC += ptz.c
SRC += alarmqueue.c
OBJS = $(addsuffix .o,$(basename $(SRC)))

all:$(LIB)
	
$(LIB) :$(OBJS)
	$(AR) -rc $(LIB) $(OBJS)
	make -f makesrc all
%.o : %.c
	$(CC)  $(BASE_CFLAGS) -g  -c $< -o $@

clean: 
	-rm -rf *.o
	-rm -rf $(LIB)
	make -f makesrc clean
